xen.git
17 years agomini-os: fix FS frontend index reading
Keir Fraser [Mon, 21 Jul 2008 08:38:33 +0000 (09:38 +0100)]
mini-os: fix FS frontend index reading

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agomini-os: fix fs-front.c debugging prints
Keir Fraser [Mon, 21 Jul 2008 08:38:19 +0000 (09:38 +0100)]
mini-os: fix fs-front.c debugging prints

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agofs-back: enable build by default
Keir Fraser [Fri, 18 Jul 2008 16:11:27 +0000 (17:11 +0100)]
fs-back: enable build by default

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agomini-os: export allocate_ondemand
Keir Fraser [Fri, 18 Jul 2008 14:45:06 +0000 (15:45 +0100)]
mini-os: export allocate_ondemand

allocate_ondemand can be used to allocate addresse space. Primarily
used for mapping MFNs, it can also be used e.g. to map grant refs.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agomini-os is missing list_top in its list.h
Keir Fraser [Fri, 18 Jul 2008 14:44:39 +0000 (15:44 +0100)]
mini-os is missing list_top in its list.h

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agostubdom: fix build dependencies
Keir Fraser [Fri, 18 Jul 2008 14:03:55 +0000 (15:03 +0100)]
stubdom: fix build dependencies

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: fix build dependency
Keir Fraser [Fri, 18 Jul 2008 13:23:41 +0000 (14:23 +0100)]
stubdom: fix build dependency

newlib now depends on mini-os header links

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoxend: portability cleanup
Keir Fraser [Fri, 18 Jul 2008 13:14:12 +0000 (14:14 +0100)]
xend: portability cleanup

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agomini-os: add stack walking debug
Keir Fraser [Fri, 18 Jul 2008 13:09:14 +0000 (14:09 +0100)]
mini-os: add stack walking debug

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoamd iommu: support device add and remove for recent dom0 kernel
Keir Fraser [Fri, 18 Jul 2008 11:46:52 +0000 (12:46 +0100)]
amd iommu: support device add and remove for recent dom0 kernel
Signed-off-by: Wei Wang <wei.wang2@amd.com>
17 years agoCheck phy: block device existence
Keir Fraser [Fri, 18 Jul 2008 11:44:58 +0000 (12:44 +0100)]
Check phy: block device existence

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years agostubdom: fix qemu keymap paths
Keir Fraser [Fri, 18 Jul 2008 11:27:45 +0000 (12:27 +0100)]
stubdom: fix qemu keymap paths

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86: Remove clocksource=tsc for now.
Keir Fraser [Fri, 18 Jul 2008 11:26:49 +0000 (12:26 +0100)]
x86: Remove clocksource=tsc for now.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Fix APERF/MPERF query bug on non-current cpu
Keir Fraser [Fri, 18 Jul 2008 10:24:13 +0000 (11:24 +0100)]
x86: Fix APERF/MPERF query bug on non-current cpu

Currently xen hypervisor cpufreq can only query APERF/MPERF on running
cpu, which will result in system broken when query on non-current
cpu. This patch fix the APERF/MPERF query bug on non-current cpu.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
17 years agoX86: Fix cpufreq _psd HW_ALL coordination bug
Keir Fraser [Fri, 18 Jul 2008 10:23:25 +0000 (11:23 +0100)]
X86: Fix cpufreq _psd HW_ALL coordination bug

Currently xen cpufreq has a bug when handleing _psd HW_ALL,
which will result in system broken when _psd HW_ALL.
This patch fix this bug by handling _psd HW_ALL in same way as
SW_ALL coordiantion, for the seek of safety.

Signed-off-by: Liu Jinsong <jinsong.liu@intel.com>
17 years agopvscsi: Install vscsi script.
Keir Fraser [Fri, 18 Jul 2008 10:22:12 +0000 (11:22 +0100)]
pvscsi: Install vscsi script.

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
Signed-off-by: Jun Kamada <kama@jp.fujitsu.com>
17 years agoblktap scripts: deletion of double check and permission of using /dev/sdxx
Keir Fraser [Fri, 18 Jul 2008 10:21:06 +0000 (11:21 +0100)]
blktap scripts: deletion of double check and permission of using /dev/sdxx

Signed-off-by: Tomonari Horikoshi <t.horikoshi@jp.fujitsu.com>
17 years agostubdom: add example config file
Keir Fraser [Fri, 18 Jul 2008 10:19:17 +0000 (11:19 +0100)]
stubdom: add example config file

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: use lwip 1.3.0 release + patch instead of checking out from cvs
Keir Fraser [Thu, 17 Jul 2008 14:37:09 +0000 (15:37 +0100)]
stubdom: use lwip 1.3.0 release + patch instead of checking out from cvs

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoPV-GRUB: use the 0.97 snapshot + patch instead of checking out from cvs
Keir Fraser [Thu, 17 Jul 2008 14:33:15 +0000 (15:33 +0100)]
PV-GRUB: use the 0.97 snapshot + patch instead of checking out from cvs

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: add functions for caml runtime
Keir Fraser [Thu, 17 Jul 2008 12:21:37 +0000 (13:21 +0100)]
stubdom: add functions for caml runtime

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoioemu: fix the devices loop.
Keir Fraser [Thu, 17 Jul 2008 10:20:01 +0000 (11:20 +0100)]
ioemu: fix the devices loop.

Signed-off-by: Jean Guyader <jean.guyader@eu.citrix.com>
Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
17 years agoxsm: Missing function in dummy module
Keir Fraser [Thu, 17 Jul 2008 10:17:32 +0000 (11:17 +0100)]
xsm: Missing function in dummy module

This adds a missing function to the dummy module to make it compile.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agox86 Cx: Add option hpetbroadcast to force enabling hpet_broadcast.
Keir Fraser [Wed, 16 Jul 2008 12:57:34 +0000 (13:57 +0100)]
x86 Cx: Add option hpetbroadcast to force enabling hpet_broadcast.

This option can be used for test & experiment purpose.

Signed-off-by: Wei Gang <gang.wei@intel.com>
17 years agox86: Adjust handle_hpet_broadcast to let it run better before broadcast exit
Keir Fraser [Wed, 16 Jul 2008 12:54:02 +0000 (13:54 +0100)]
x86: Adjust handle_hpet_broadcast to let it run better before broadcast exit

Since hpet_broadcast_exit has been moved after interrupt enabled in C3
case, so adjust the handler of hpet broadcast to adapt to this.
Meanwhile, remove a freqently executed debug print line to simplify
the serial output.

Signed-off-by: Wei Gang <gang.wei@intel.com>
17 years agoPV-GRUB: allow passing menu.lst as a ramdisk
Keir Fraser [Wed, 16 Jul 2008 12:50:47 +0000 (13:50 +0100)]
PV-GRUB: allow passing menu.lst as a ramdisk

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86 shadow: Re-init per-page spinlock before freeing p2m pages.
Keir Fraser [Wed, 16 Jul 2008 10:25:06 +0000 (11:25 +0100)]
x86 shadow: Re-init per-page spinlock before freeing p2m pages.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoioemu: Fix issues when passthrough device is hot-removed from HVM domain.
Keir Fraser [Wed, 16 Jul 2008 10:16:48 +0000 (11:16 +0100)]
ioemu: Fix issues when passthrough device is hot-removed from HVM domain.

When passthrough device is hot removed from HVM domain by "xm
pci-detach" command, following issues occur. The patch fixes them.

   - Allocated memory is not deallocated.
   - Unbind interrupt with invalid interrupt pin.
   - MSI-X memory mapped register area is not unmapped.

Signed-off-by: Yuji Shimada <shimada-yxb@necst.nec.co.jp>
17 years agovt-d: Disable VT-d table output on DMA page faults
Keir Fraser [Wed, 16 Jul 2008 10:15:14 +0000 (11:15 +0100)]
vt-d: Disable VT-d table output on DMA page faults

Printing VT-d tables requires map_domain_page() which can not be
called from interrupt context (on x86_32).

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
17 years agofs-backend: do not expose file descriptors to frontend
Keir Fraser [Wed, 16 Jul 2008 10:13:21 +0000 (11:13 +0100)]
fs-backend: do not expose file descriptors to frontend

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoxend: Fix destruction of VMMetrics objects for managed domains
Keir Fraser [Wed, 16 Jul 2008 10:12:36 +0000 (11:12 +0100)]
xend: Fix destruction of VMMetrics objects for managed domains

While plugging a xend memory lead (c/s 18030), I introduced a bug in
the case of managed domains.  Managed domains continue to exist after
shutdown and thus should not have their associated VMMetrics object
destroyed until deleted.

The bug actually manifested by a new -> start -> shutdown -> delete
sequence of operations.  Shutdown destroyed the VMMetrics object and
delete tried to do the same :-):

Signed-off-by: Jim Fehlig <jfehlig@novell.com>
17 years agofs-backend: fix ioctl(BLKGETSIZE) call on 64bit
Keir Fraser [Tue, 15 Jul 2008 17:00:13 +0000 (18:00 +0100)]
fs-backend: fix ioctl(BLKGETSIZE) call on 64bit

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agofs-backend: Fix freelist implementation
Keir Fraser [Tue, 15 Jul 2008 16:59:31 +0000 (17:59 +0100)]
fs-backend: Fix freelist implementation

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86: Report TSC skew on boot at higher log level.
Keir Fraser [Tue, 15 Jul 2008 16:58:39 +0000 (17:58 +0100)]
x86: Report TSC skew on boot at higher log level.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: Ensure TSC calibration stats are same across all CPUs when
Keir Fraser [Tue, 15 Jul 2008 16:57:00 +0000 (17:57 +0100)]
x86: Ensure TSC calibration stats are same across all CPUs when
running with clocksource=tsc.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: No need to vcpu_update_system_time() on map_vcpu_info().
Keir Fraser [Tue, 15 Jul 2008 16:56:25 +0000 (17:56 +0100)]
x86: No need to vcpu_update_system_time() on map_vcpu_info().
Also, ensure update_vcpu_system_time() triggers at least once for any
given vcpu, even if the TSC stamp is zero.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxen: Small cleanups towards allowing stricter compile warnings.
Keir Fraser [Tue, 15 Jul 2008 15:13:46 +0000 (16:13 +0100)]
xen: Small cleanups towards allowing stricter compile warnings.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agoiommu: disable by default. 'iommu' on cmdline to enable.
Keir Fraser [Tue, 15 Jul 2008 14:36:50 +0000 (15:36 +0100)]
iommu: disable by default. 'iommu' on cmdline to enable.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agotools: Make functions static which should not be exported.
Keir Fraser [Tue, 15 Jul 2008 14:03:58 +0000 (15:03 +0100)]
tools: Make functions static which should not be exported.
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agox86: Add clocksource=tsc option.
Keir Fraser [Tue, 15 Jul 2008 13:04:02 +0000 (14:04 +0100)]
x86: Add clocksource=tsc option.

This option should only be used on machines where TSC is known to be
synchronized across all processors.  A future TODO is to dynamically
determine if this is the case.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: platform-timer read function returns 64 bits.
Keir Fraser [Tue, 15 Jul 2008 12:36:22 +0000 (13:36 +0100)]
x86: platform-timer read function returns 64 bits.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agotools: Declare functions static where they should be, and provide
Keir Fraser [Tue, 15 Jul 2008 12:19:26 +0000 (13:19 +0100)]
tools: Declare functions static where they should be, and provide
proper prototypes for others as required.

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agostubdom: enable compilation/installation by default
Keir Fraser [Mon, 14 Jul 2008 14:21:03 +0000 (15:21 +0100)]
stubdom: enable compilation/installation by default

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agovt-d: Disable VT-d if parsing ACPI DMAR fails
Keir Fraser [Mon, 14 Jul 2008 14:20:35 +0000 (15:20 +0100)]
vt-d: Disable VT-d if parsing ACPI DMAR fails

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
17 years agoxentop: declare signal handler as static
Keir Fraser [Mon, 14 Jul 2008 12:26:45 +0000 (13:26 +0100)]
xentop: declare signal handler as static
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agoRevert 18025:07c7aef164 -- go back to 8MB VRAM.
Keir Fraser [Mon, 14 Jul 2008 12:13:39 +0000 (13:13 +0100)]
Revert 18025:07c7aef164 -- go back to 8MB VRAM.

We may well want it in future anyway, and changing it makes
save/restore compatibility difficult.

Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86: PIT broadcast to fix local APIC timer stop issue for Deep C state
Keir Fraser [Mon, 14 Jul 2008 09:43:32 +0000 (10:43 +0100)]
x86: PIT broadcast to fix local APIC timer stop issue for Deep C state

Local APIC timer may stop at deep C state (C3/C4...) entry. Initial
HPET broadcast working in legacy replacing mode, broke RTC intr, so
was bypassed. This patch add the logic that use platform timer (PIT)
to reenable local APIC timer at C state entry/exit.

Currently, only keep PIT enabled with 100Hz freq. The next step is
trying to dynamically enable/disable PIT while needed, and give it
lower freq.

Signed-off-by: Yu Ke <ke.yu@intel.com>
Signed-off-by: Tian Kevin <kevin.tian@intel.com>
Signed-off-by: Wei Gang <gang.wei@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoxm: vt-d: Add a command "xm pci-list-assignable-devices" to list all
Keir Fraser [Mon, 14 Jul 2008 09:12:07 +0000 (10:12 +0100)]
xm: vt-d: Add a command "xm pci-list-assignable-devices" to list all
the assignable devices.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
17 years agoxend: vt-d: improved FLR logic for pass-thru PCI devices
Keir Fraser [Mon, 14 Jul 2008 09:11:39 +0000 (10:11 +0100)]
xend: vt-d: improved FLR logic for pass-thru PCI devices

1) If the device is PCIe endpoint and supports PCIe FLR, we use that;
else

2) if the device is PCIe endpoint, and all functions on the
device are assigned to the same guest, we use the immediate parent
bus's Secondary Bus Reset to reset all functions of the device (here,
actually we require all the functions of the device be assigned to the
same guest); else

3) if the device is PCI endpoint and is on a host bus
(e.g. integrated devices), and if the device supports PCI Advanced
Capabilities, we use that for FLR; else

4) we use the Secondary Bus Reset (if the PCI device is behind a
PCI/PCI-X bridge, then all devices behind the uppermost such PCI/PCI-X
bridge above this device must be co-assigned).

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
17 years agovt-d: Remove the FLR logic in Xen.
Keir Fraser [Mon, 14 Jul 2008 09:10:14 +0000 (10:10 +0100)]
vt-d: Remove the FLR logic in Xen.

The current simple logic has some issues: 1) Dstate transition is not
guaranteed to properly clear the device state; 2) the current code for
PCIe FLR is actually buggy: PCI_EXP_DEVSTA_TRPND doesn't mean the
completion of FLR; according to the PCIe spec, after issuing FLR, we
should wait at least 100ms.

The improved FLR logic will be added into xend.

Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
17 years agoxend: A small cleanup to the find_sysfs_mnt() of pci.py
Keir Fraser [Mon, 14 Jul 2008 09:09:25 +0000 (10:09 +0100)]
xend: A small cleanup to the find_sysfs_mnt() of pci.py
Signed-off-by: Dexuan Cui <dexuan.cui@intel.com>
17 years agoioemu: sdl without OpenGl fix
Keir Fraser [Mon, 14 Jul 2008 09:07:11 +0000 (10:07 +0100)]
ioemu: sdl without OpenGl fix
Signed-off-by: Frederic Guihery <sygus@cat-lan.com>
Acked-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
17 years agoChoice of network interface for establishing a bridge on if NFSROOT is used
Keir Fraser [Mon, 14 Jul 2008 09:04:41 +0000 (10:04 +0100)]
Choice of network interface for establishing a bridge on if NFSROOT is used

This patch fixes a problem related to machines that are booted using
nfsroot ( '/' provided via nfs). Previously the code was assuming that
nfsroot would be provided via eth0. Now this additional code checks
over which interface the nfsroot is provided after detecting that
nfsroot is actually being used. To determine from where nfsroot is
mounted I am reading the kernel command line (/proc/cmdline) and
filter for an argument starting with 'nfsroot=' and determine the nfs
server's IP address by assuming the format 'nfsroot=<ip
adddress>:<path to root>' - if there's a better way of doing this,
please let me know.  After that I determine the interface over which
this IP address would be accessed using 'ip route get <address>'. Then
I compare that interface against a previously determined default
interface and if they are equal return a value that causes an
alternative interface to be chosen.

Signed-off-by: Stefan Berger <stefanb@us.ibm.com>
17 years agoblktap: portability cleanup
Keir Fraser [Mon, 14 Jul 2008 09:03:09 +0000 (10:03 +0100)]
blktap: portability cleanup
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agostubdom: missing fixes for old gcc
Keir Fraser [Mon, 14 Jul 2008 09:00:47 +0000 (10:00 +0100)]
stubdom: missing fixes for old gcc

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: fixes for old gcc & binutils
Keir Fraser [Fri, 11 Jul 2008 14:37:31 +0000 (15:37 +0100)]
stubdom: fixes for old gcc & binutils

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoblktap: cleanup
Keir Fraser [Fri, 11 Jul 2008 14:36:40 +0000 (15:36 +0100)]
blktap: cleanup

Make functions w/o a prototype static and remove redundant
declaration of xs_fire_next_watch().

Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agolibxc: remove redundant declaration of xc_copy_to_domain_page().
Keir Fraser [Fri, 11 Jul 2008 14:35:50 +0000 (15:35 +0100)]
libxc: remove redundant declaration of xc_copy_to_domain_page().
Signed-off-by: Christoph Egger <Christoph.Egger@amd.com>
17 years agox86: allow control domain to limit machine addresses given to a particular guest
Keir Fraser [Fri, 11 Jul 2008 11:51:26 +0000 (12:51 +0100)]
x86: allow control domain to limit machine addresses given to a particular guest

This allows domains which make buggy assumptions about the maximum
possible MFN to be worked around.

Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
17 years agoiommu: make interrupt remapping more generic
Keir Fraser [Fri, 11 Jul 2008 11:49:14 +0000 (12:49 +0100)]
iommu: make interrupt remapping more generic
Signed-off-by: Wei Wang <wei.wang2@amd.com>
17 years agoamd iommu: add interrupt remapping support
Keir Fraser [Fri, 11 Jul 2008 11:48:45 +0000 (12:48 +0100)]
amd iommu: add interrupt remapping support
Signed-off-by: Wei Wang <wei.wang2@amd.com>
17 years agoxend: Ignore errors from dying domains in RPC server
Keir Fraser [Fri, 11 Jul 2008 11:47:50 +0000 (12:47 +0100)]
xend: Ignore errors from dying domains in RPC server

When a domain is in the process of shutting down there is a small
window when the domain is known to XenD, but it will be unable to form
an SXPR for it due it being in the middle of device hot-unplug. This
causes the 'xm list' command to totally fail with an error like

# xm list
Error: Device 0 not connected
Usage: xm list [options] [Domain, ...]

The 'xm list' command calls into the 'domains' method of
XMLRPCServer.py in XenD. This method just iterates over the list of
domains, fetching the sxpr for each in turn, but with no exception
handling. So if a single domain fails to generate an sxpr, no data is
returned even for other domains which are still functional.  This
patch simply makes XenD ignore and skip over domains which throw an
exception, logging the problematic domain.

NB, this problem only hits 'xm list' if it is configured to use the
legay XMLRPC server instead of XenAPI.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
17 years agovt-d: Fix Host Address Width
Keir Fraser [Fri, 11 Jul 2008 11:46:33 +0000 (12:46 +0100)]
vt-d: Fix Host Address Width

Host Address Width of the platform should be computed as N+1,
where N is the value reported in dmar acpi table.

Signed-off-by: Ameya Palande <2ameya@gmail.com>
17 years agostubdom: do not use realpath, new in make 3.81
Keir Fraser [Fri, 11 Jul 2008 11:45:06 +0000 (12:45 +0100)]
stubdom: do not use realpath, new in make 3.81

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoFix memory leak in xend
Keir Fraser [Fri, 11 Jul 2008 11:44:15 +0000 (12:44 +0100)]
Fix memory leak in xend
Signed-off-by: Jim Fehlig <jfehlig@novell.com>
17 years agotapdisk: in case O_DIRECT fails, retry again with o_flags but
Keir Fraser [Fri, 11 Jul 2008 11:43:33 +0000 (12:43 +0100)]
tapdisk: in case O_DIRECT fails, retry again with o_flags but
O_DIRECT, instead of fixed value O_RD_WR | O_LARGEFILE

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoioemu: drop shadow vram
Keir Fraser [Fri, 11 Jul 2008 11:33:00 +0000 (12:33 +0100)]
ioemu: drop shadow vram

We can now actually drop the shadow vram entirely thanks to dirty page
tracking.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agohvmloader, rombios: Make use of new rom-lock facility in ioemu platform device.
Keir Fraser [Fri, 11 Jul 2008 11:31:32 +0000 (12:31 +0100)]
hvmloader, rombios: Make use of new rom-lock facility in ioemu platform device.
Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agovt-d: Fixup when mapping devices on non-PCIe buses
Keir Fraser [Thu, 10 Jul 2008 16:33:23 +0000 (17:33 +0100)]
vt-d: Fixup when mapping devices on non-PCIe buses

The source-id for transactions on non-PCIe buses seem to originate
from devfn=0 on the secondary bus behind the bridge.  Map that ID as
well when assigning the device.  The ID to use in these scenarios is
not particularly well documented anywhere.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
17 years agoioemu: drop unused 4MB video memory
Keir Fraser [Thu, 10 Jul 2008 16:29:06 +0000 (17:29 +0100)]
ioemu: drop unused 4MB video memory

Since we only emulate the cirrus VGA video card which is only able to
expose 4MB video memory, we don't need more than that.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoioemu: create a rom-protect platform flag.
Keir Fraser [Thu, 10 Jul 2008 15:15:37 +0000 (16:15 +0100)]
ioemu: create a rom-protect platform flag.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86 hvm: New boot option 'softtsc' to cause RDTSC to be trapped-and-emulated.
Keir Fraser [Thu, 10 Jul 2008 14:45:18 +0000 (15:45 +0100)]
x86 hvm: New boot option 'softtsc' to cause RDTSC to be trapped-and-emulated.

Signed-off-by: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agostubdom: Fixes for gcc 4.2.4 32bit
Keir Fraser [Thu, 10 Jul 2008 14:32:18 +0000 (15:32 +0100)]
stubdom: Fixes for gcc 4.2.4 32bit
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agox86 hvm: New hvm_op "set_mem_type" which allows marking ram page
Keir Fraser [Thu, 10 Jul 2008 14:30:39 +0000 (15:30 +0100)]
x86 hvm: New hvm_op "set_mem_type" which allows marking ram page
ranges as ro, rw, or mmio_dm.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
17 years agox86: Do not allow write access to p2m_ram_ro memory type.
Keir Fraser [Thu, 10 Jul 2008 14:19:56 +0000 (15:19 +0100)]
x86: Do not allow write access to p2m_ram_ro memory type.
Log and discard such access attempts.

Signed-off-by: Trolle Selander <trolle.selander@eu.citrix.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoPV-GRUB: Enable xfs support
Keir Fraser [Thu, 10 Jul 2008 13:20:15 +0000 (14:20 +0100)]
PV-GRUB: Enable xfs support

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoPV-GRUB: xfs support
Keir Fraser [Thu, 10 Jul 2008 13:17:28 +0000 (14:17 +0100)]
PV-GRUB: xfs support

i386 doesn't have PAE anyway.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: fixes to compile with qemu-xen
Keir Fraser [Thu, 10 Jul 2008 13:15:46 +0000 (14:15 +0100)]
stubdom: fixes to compile with qemu-xen

This adds fixes to the stub domain build into compiling Ian Jackson's
qemu-xen.  The most notable change is that mini-os headers now
#include each other through a mini-os/ prefix, so that we can turn all
-I into -isystem and still be sure that we include Mini-OS headers
(and not qemu's console.h or blktaplib's list.h for instance...).

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agointel: Stricter check for cpuid feature mask MSR availability.
Keir Fraser [Thu, 10 Jul 2008 10:26:42 +0000 (11:26 +0100)]
intel: Stricter check for cpuid feature mask MSR availability.

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Jun Nakajima <nakajima.jun@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agovt-d: Fix double spin_lock_irqsave().
Keir Fraser [Thu, 10 Jul 2008 09:07:32 +0000 (10:07 +0100)]
vt-d: Fix double spin_lock_irqsave().

The duplicate spin_lock_irqsave() flushes the original EFLAGS saved,
and thus disables local irqs permanently.

Signed-off-by: Xin, Xiaohui <Xiaohui.xin@intel.com>
Signed-off-by: Tian, Kevin <Kevin.Tian@intel.com>
17 years agoFix a couple of Grzegorz Milos copyright lines.
Keir Fraser [Thu, 10 Jul 2008 09:02:15 +0000 (10:02 +0100)]
Fix a couple of Grzegorz Milos copyright lines.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agominios: Add missing fcntl.h.
Keir Fraser [Wed, 9 Jul 2008 15:00:05 +0000 (16:00 +0100)]
minios: Add missing fcntl.h.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agostubdom: add stub functions to reduce qemu patches
Keir Fraser [Wed, 9 Jul 2008 14:58:20 +0000 (15:58 +0100)]
stubdom: add stub functions to reduce qemu patches

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: Add root Makefile targets, disabled by default for now
Keir Fraser [Wed, 9 Jul 2008 13:21:42 +0000 (14:21 +0100)]
stubdom: Add root Makefile targets, disabled by default for now

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoMake PCI device release function generic
Keir Fraser [Wed, 9 Jul 2008 13:08:58 +0000 (14:08 +0100)]
Make PCI device release function generic

Release all pci devices before doing iommu domain teardown.  Also
moved pdev_flr() into generic pci code.

Signed-off-by: Espen Skoglund <espen.skoglund@netronome.com>
17 years agostubdom: fix missing evtchn.h header
Keir Fraser [Wed, 9 Jul 2008 12:01:16 +0000 (13:01 +0100)]
stubdom: fix missing evtchn.h header

We actually do not need any since we include MiniOS' headers.

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoUpdate .hgignore
Keir Fraser [Wed, 9 Jul 2008 12:00:23 +0000 (13:00 +0100)]
Update .hgignore

17 years agovgabios: Delete autogenerated file from repository.
Keir Fraser [Wed, 9 Jul 2008 11:59:40 +0000 (12:59 +0100)]
vgabios: Delete autogenerated file from repository.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agostubdom: make compilation independent of tools/ by building our own copy of the includes
Keir Fraser [Wed, 9 Jul 2008 10:51:46 +0000 (11:51 +0100)]
stubdom: make compilation independent of tools/ by building our own copy of the includes

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agoSome latest Intel CPU models support cpuid feature mask.
Keir Fraser [Wed, 9 Jul 2008 10:42:45 +0000 (11:42 +0100)]
Some latest Intel CPU models support cpuid feature mask.

CPUID.1.EAX>0x00010674.CPUID mask feature is intended to be used to
limit the feature flags reported by CPUID.1.EDX:ECX.

Signed-off-by: Liping Ke <liping.ke@intel.com>
Signed-off-by: Jun Nakajima <nakajima.jun@intel.com>
Signed-off-by: Yunhong Jiang <yunhong.jiang@intel.com>
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agoSwitching to merged (git) qemu by default
Keir Fraser [Wed, 9 Jul 2008 10:05:26 +0000 (11:05 +0100)]
Switching to merged (git) qemu by default

The merged qemu tree is now on xenbits at:
   http://xenbits.xensource.com/git-http/qemu-xen-unstable.git
(and a corresponding staging tree in /staging).

That's a raw git tree fetchable by `git-clone http://....', so not
really browseable.  There will be gitweb, and a real git server, set
up shortly, as well as a one-way Mercurial gateway.

The tools/ioemu subdirectory will remain in the xen-unstable tree for
this release, as an alternative.

Signed-off-by: Ian Jackson <ian.jackson@eu.citrix.com>
17 years agop2m: Support page orders other than 0 (4kB) and 9 (2MB)
Keir Fraser [Wed, 9 Jul 2008 10:04:18 +0000 (11:04 +0100)]
p2m: Support page orders other than 0 (4kB) and 9 (2MB)
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agox86 p2m superpage fix: Re-insert missing shadow code from the original
Keir Fraser [Wed, 9 Jul 2008 10:02:37 +0000 (11:02 +0100)]
x86 p2m superpage fix: Re-insert missing shadow code from the original
patch that was  submitted to xen-devel, to remove mappings when we're
removing a p2m 2mb page.

Signed-off-by: Gianluca Guida <gianluca.guida@eu.citrix.com>
17 years agoBlktapctrl compatibility layer
Keir Fraser [Wed, 9 Jul 2008 09:41:49 +0000 (10:41 +0100)]
Blktapctrl compatibility layer

I originally had just changed the NEWINTF ioctl to send over 48-bits
of information, which works on 64-bit but not on 32-bit (since the arg
is an unsigned long).  Additionally, the previous changes would break
an older userland against a new kernel.  For that reason, introduce a
new ioctl (NEWINTF_EXT) that fixes both of these problems.  This is
the dom0 userland side.

Signed-off-by: Chris Lalancette <clalance@redhat.com>
17 years agoioemu: pass-through: XC_PAGE_SIZE should be used
Keir Fraser [Wed, 9 Jul 2008 09:39:42 +0000 (10:39 +0100)]
ioemu: pass-through: XC_PAGE_SIZE should be used

Signed-off-by: KUWAMURA Shin'ya <kuwa@jp.fujitsu.com>
17 years agoioemu: pass-through: pt_bar_mapping fix
Keir Fraser [Wed, 9 Jul 2008 09:39:13 +0000 (10:39 +0100)]
ioemu: pass-through: pt_bar_mapping fix

In pt_bar_mapping function, r->addr should not be changed by invalid
value(-1). This value(-1) causes failure of mapping BAR when I/O Space
or Memory Space enable bit is updated repeatedly by native windows
driver.

This situation occurs in Windows Vista guest.

Signed-off-by: Naoki Nishiguchi <nisiguti@jp.fujitsu.com>
17 years agoFix xm vcpu-pin for Domain-0
Keir Fraser [Wed, 9 Jul 2008 09:38:20 +0000 (10:38 +0100)]
Fix xm vcpu-pin for Domain-0

Signed-off-by: Masaki Kanno <kanno.masaki@jp.fujitsu.com>
17 years agoRevert dependency on new GNUMake feature.
Keir Fraser [Wed, 9 Jul 2008 09:37:20 +0000 (10:37 +0100)]
Revert dependency on new GNUMake feature.
Signed-off-by: Keir Fraser <keir.fraser@citrix.com>
17 years agostubdom: use a newlib snapshot instead of the slow cvs checkout.
Keir Fraser [Tue, 8 Jul 2008 16:25:04 +0000 (17:25 +0100)]
stubdom: use a newlib snapshot instead of the slow cvs checkout.
Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>
17 years agostubdom: do not build tapdisk as it it not supposed to build and we don't need it
Keir Fraser [Tue, 8 Jul 2008 16:15:23 +0000 (17:15 +0100)]
stubdom: do not build tapdisk as it it not supposed to build and we don't need it

Signed-off-by: Samuel Thibault <samuel.thibault@eu.citrix.com>